package com.xiaochun.hxhj;

import android.content.Intent;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;

/**
 * @Author: ChenYao
 * @Describe: 协议
 * @Date: 2023/3/22 12:21
 */
public class ProtocolActivity extends BaseActivity implements View.OnClickListener {
    private LinearLayout ll_reback;
    private RelativeLayout rl_protocol_1;
    private RelativeLayout rl_protocol_2;

    @Override
    protected int initLayout() {
        return R.layout.activity_protocol;
    }

    @Override
    protected void initView() {
        ll_reback = findViewById(R.id.ll_reback);
        rl_protocol_1 = findViewById(R.id.rl_protocol_1);
        rl_protocol_2 = findViewById(R.id.rl_protocol_2);
    }

    @Override
    protected void initData() {

    }

    @Override
    protected void initListener() {
        ll_reback.setOnClickListener(this);
        rl_protocol_1.setOnClickListener(this);
        rl_protocol_2.setOnClickListener(this);
    }

    @Override
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.ll_reback:
                finish();
                break;
            case R.id.rl_protocol_1:
                startActivity(new Intent(context, WebviewActivity2.class).putExtra("type", "用户协议").putExtra("url", "https://huiduji.bigchun.com/useragreement.html"));
                break;
            case R.id.rl_protocol_2:
                startActivity(new Intent(context, WebviewActivity2.class).putExtra("type", "隐私政策").putExtra("url", "https://huiduji.bigchun.com/privarypolicy.html"));
                break;
            default:
                break;
        }
    }
}
